<template>
  <div class="loading" v-show="mainstore.isloading" @click="loadingclick">
    <div class="bg">
        <img src="@/assets/img/home//full-screen-loading.gif" alt="">
    </div>
  </div>
</template>

<script setup>
import useMainStore from '@/stores/modules/main';


const mainstore=useMainStore();
const loadingclick=()=>{
    mainstore.isloading=false;
}
 
</script>

<style lang="less" scoped>
.loading{
  position:fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 999;
  background: #080808;
  opacity: 0.4;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: #faf7f7;

  .bg{
    display: flex;
    justify-content: center;
    align-items: center;
    // margin-top: 5px;
    width: 104px;
    height: 104px;
    // background: url(@/assets/img/home/loading-bg.png) 0 0  100% no-repeat;
    background-image: '@/assets/img/home/loading-bg.png';
    background-position: 0 0 100% no-repeat;
  }
}
</style>